import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("输入n:");
        int n = scanner.nextInt();
        for(int i = 1; i <= n; i++){
            for(int j = 1; j <= n; j++){
                System.out.print(j+"*"+i+"="+i*j+" ");
                if(j == i){
                    System.out.println();
                    break;
                }
            }
        }
    }
}